﻿using System.Text;
using System.Collections;
using RAP.Framework.Libary.DomTemplateBuilder.Interface;

namespace RAP.Framework.Libary.DomTemplateBuilder.Handler.DictionaryActions
{
	/// <summary>
	/// 移除字典项的Handler
	/// </summary>
	public class RemovePropertyActionHandler : DictionaryActionElementHandler
    {
        public override void DoAction ( IDictionary dict,
            StringBuilder writer,
            StringBuilder actionWriter,
            object rootParamObject,
            object parentParamObject,
            ITemplateRenderContext context )
        {
            dict.Remove ( this.GetPropertyName ( rootParamObject, parentParamObject, context ) );
        }
    }
}
